package threadDemo;
class MyDesignF{
    private volatile static MyDesignF obj = null;
    private MyDesignF(){}
    public  static MyDesignF getInstance(){
        if(obj == null){
            synchronized (MyDesignF.class){
                if(obj == null){
                    obj = new MyDesignF();
                }
            }
        }
        return obj;
    }
}
public class Demo5 {
    public static void main(String[] args) {

    }
}
